<template>
  <div class="login-account">
    <el-form :model="phone" :rules="rules">
      <el-form-item label="手机号" prop="num">
        <el-input v-model="phone.num"></el-input>
      </el-form-item>
      <el-form-item label="验证码" prop="code">
        <div class="get-code">
          <el-input v-model="phone.code"></el-input>
          <el-button type="primary" class="get-btn">获取验证码</el-button>
        </div>
      </el-form-item>
    </el-form>
  </div>
</template>

<script setup>
import { reactive } from "vue";
const phone = reactive({
  num: "",
  code: "",
});

const rules = {
  num: [{ required: true, message: "手机号不能为空", trigger: "blur" }],
  code: [{ required: true, message: "验证码不能为空", trigger: "blur" }]
};
</script>

<style scoped>
  .get-code {
    display: flex;
  }
  .get-btn {
    margin-left: 10px;
  }
</style>
